﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="fhdb" content="true">
    <title>百瑞花苑-支付凭证</title>
    <link href="../../css/jquery-confirm.css" rel="stylesheet" />
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <link href="../personalCenter/css/helpCenter.css" rel="stylesheet" />
    <script type="text/javascript" src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="../../script/js/jquery-confirm.js"></script>
    <script type="text/javascript">
        var id = getUrlParam('id');
        $(function () {
            $.ajax({
                type: "post",
                data: { id: id },
                url: "/order/ckzfpz",
                success: function (result) {
                    $("img").attr("src", "/images/"+result);
                }
            });
        })
        function GoOkPay() {
            $.confirm({
                title: '提示',
                content: '是否收到付款,如收到,请确认收款！',
                type: 'dark',
                typeAnimated: true,
                buttons: {
                    tryAgain: {
                        text: '确认',
                        btnClass: 'btn-green',
                        action: function () {
                            $.ajax({
                                type: "post",
                                data: { ID: id, state: "4" },
                                url: "../../BaseRefWeb.aspx?stype=ISpOrderFun&method=DoWebEdit&type=sp",
                                success: function (result) {
                                    var data = JSON.parse(result);
                                    if (data.msg == "_timeout") {
                                        window.location.href = "../UserLogin/Login.html";
                                    }
                                    else {
                                        window.location.href = "order.html";
                                    }
                                }
                            });
                        }
                    },
                    取消: function () {
                    }
                }
            });
        }
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]); return null; //返回参数值
        }
    </script>
</head>
<body style="background-color:#f0f0f0">
    <div class="backBox" onClick="javascript:history.back(-1);">
        <span class="glyphicon glyphicon-chevron-left"></span>
    </div>
    <div class="topTitle">支付凭证</div>
    <div style="width:90%;color:red; font-size:18px; font-weight:bold; margin:2% auto;">
        提示：核对凭证与支付订单是否相同！有问题联系客服或找客服举报。
    </div>
    <div style="width:80%; height:500px;  margin: 0 auto;">
        <img  style="width:100%; height:100%" />
    </div>
    <button style="margin-left:40%;margin-top:5%;border: 0;background-color: red;color: white;border-radius: 5px;width:100px;" onClick="GoOkPay()">确认收款</button>
    <div style="height:100px;"></div>
</body>
</html>